﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace lcmyjobs.Web.invite
{
    public partial class shownews : BasePage
    {
        lcmyjobs.BLL.news bn = new BLL.news();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                int id = int.Parse(Application["webid"].ToString());                
                Repeater1.DataSource = bn.GetListNews(id, 20, 5);
                Repeater1.DataBind();
                if (Request.QueryString["id"] != null)
                {
                    try
                    {
                        int nid = int.Parse(Request.QueryString["id"]);
                        DataSet ds = bn.GetNews(nid);
                        if (ds.Tables[0].Rows.Count > 0)
                        {
                            this.Title = string.Format("{2}人才网   {2}招聘网   {2}求职网   {2}猎头网   {0}—招聘面试官：{1}", Application["webname"].ToString(), ds.Tables[0].Rows[0][0].ToString(), Application["webregion"].ToString());
                            //ntitle, ntime,truename,ntname,ncontent,ntid                    
                            this.lbltitle.Text = ds.Tables[0].Rows[0][0].ToString();
                            this.lbltime.Text = "发布时间：" + ds.Tables[0].Rows[0][1].ToString() + " 来源：" + ds.Tables[0].Rows[0][2].ToString();
                            this.lblconten.Text = ds.Tables[0].Rows[0][4].ToString();
                        }
                    }
                    catch (Exception ex)
                    {


                    }

                }

            }

        }
    }
}